import React from 'react'
import { Elements } from '@stripe/react-stripe-js'
import PaymentModalBox from './PaymentModalBox'
import { loadStripe } from '@stripe/stripe-js'
import { STRIPE_KEY } from '../../constants'
const PaymentElementsWrapper = ({ basicModal, setBasicModal }) => {
  // const stripePublishableKey = "pk_live_D7jKGi804L1K31F6qW4o13ob@0HGDWXB9N"
    const stripePublishableKey = STRIPE_KEY
    const stripePromise = loadStripe(
  stripePublishableKey
    )
  return (
    <Elements stripe={stripePromise}>
      <PaymentModalBox basicModal={basicModal} setBasicModal={setBasicModal} />
    </Elements>
  )
}

export default PaymentElementsWrapper
